#include "common.hlsl"

cbuffer cbPerObjectVS : register(b0)
{
	float4x4 WorldViewProjection : packoffset(c0);
	float4x4 World : packoffset(c4);
}

struct VS_INPUT
{
	float4 Pos : POSITION0;
	float3 Normal	: NORMAL0;		
	float2 UV		: TEXCOORD0;	
	float4 Tangent : TANGENT0;
};

VS_OUTPUT RenderSceneVS(VS_INPUT In)
{
	VS_OUTPUT Output;
	
	Output.Pos = mul(In.Pos, WorldViewProjection);
	Output.UV = In.UV;
	Output.Normal = mul(In.Normal, (float3x3)World);
	float3 tmpTan = mul((float3)In.Tangent, (float3x3)World);
	Output.Tangent = float4(tmpTan, In.Tangent.w);
	
	return Output;
}